Optimal. Leaf size=16 \[ \sin (x)-i \cos (x)+i \tanh ^{-1}(\cos (x)) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.09, antiderivative size = 16, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.636, Rules used = {3518, 3108, 3107, 2637, 2592, 321, 206} \[ \sin (x)-i \cos (x)+i \tanh ^{-1}(\cos (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 321
Rule 2592
Rule 2637
Rule 3107
Rule 3108
Rule 3518
Rubi steps
\begin {align*} \int \frac {\csc (x)}{i+\tan (x)} \, dx &=\int \frac {\cot (x)}{i \cos (x)+\sin (x)} \, dx\\ &=-(i \int \cot (x) (\cos (x)+i \sin (x)) \, dx)\\ &=-(i \int (i \cos (x)+\cos (x) \cot (x)) \, dx)\\ &=-(i \int \cos (x) \cot (x) \, dx)+\int \cos (x) \, dx\\ &=\sin (x)+i \operatorname {Subst}\left (\int \frac {x^2}{1-x^2} \, dx,x,\cos (x)\right )\\ &=-i \cos (x)+\sin (x)+i \operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\cos (x)\right )\\ &=i \tanh ^{-1}(\cos (x))-i \cos (x)+\sin (x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 31, normalized size = 1.94 \[ \sin (x)-i \cos (x)-i \log \left (\sin \left (\frac {x}{2}\right )\right )+i \log \left (\cos \left (\frac {x}{2}\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.47, size = 25, normalized size = 1.56 \[ -i \, e^{\left (i \, x\right )} + i \, \log \left (e^{\left (i \, x\right )} + 1\right ) - i \, \log \left (e^{\left (i \, x\right )} - 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.31, size = 22, normalized size = 1.38 \[ -\frac {2 i}{-i \, \tan \left (\frac {1}{2} \, x\right ) + 1} - i \, \log \left (-i \, \tan \left (\frac {1}{2} \, x\right )\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.16, size = 21, normalized size = 1.31 \[ \frac {2}{\tan \left (\frac {x}{2}\right )+i}-i \ln \left (\tan \left (\frac {x}{2}\right )\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.31, size = 28, normalized size = 1.75 \[ \frac {2}{\frac {\sin \relax (x)}{\cos \relax (x) + 1} + i} - i \, \log \left (\frac {\sin \relax (x)}{\cos \relax (x) + 1}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.80, size = 20, normalized size = 1.25 \[ -\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )\right )\,1{}\mathrm {i}+\frac {2}{\mathrm {tan}\left (\frac {x}{2}\right )+1{}\mathrm {i}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\csc {\relax (x )}}{\tan {\relax (x )} + i}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________